Devices do not have an associated timestamp, but as we can now
track the MRU order of their connections, it makes sense to consider
the time of the most recent succesful connection the timestamp
of the device item.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2407>
this._deviceName = '';
this._connectionItems = new Map();
- this._itemSorter = new ItemSorter();
+ this._itemSorter = new ItemSorter({trackMru: true});
// Item shown in the 0-connections case
this._autoConnectItem =
this._activeConnectionChanged();
}
+ get timestamp() {
+ const [item] = this._itemSorter.itemsByMru();
+ return item?.timestamp ?? 0;
+ }
+
_canReachInternet() {
if (this._client.primary_connection !== this._device.active_connection)
return true;